<%--
  Created by IntelliJ IDEA.
  User: 长沙吴亦凡
  Date: 2021/12/18
  Time: 14:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/updStu" method="post">
    <table border="1" cellpadding="10" cellspacing="0">
        <input type="hidden" name="id" value="${student.id}">
        <tr>
            <td>姓名</td>
            <td><input type="text" name="name" value="${student.name}"></td>
        </tr>
        <tr>
            <td>性别</td>
            <td><input type="text" name="gender" value="${student.gender}"></td>
        </tr>
        <tr>
            <td>年龄</td>
            <td><input type="text" name="age" value="${student.age}"></td>
        </tr>
        <tr>
            <td>电话</td>
            <td><input type="text" name="telephone" value="${student.telephone}"></td>
        </tr>
        <tr>
            <td>邮箱</td>
            <td><input type="text" name="email" value="${student.email}"></td>
        </tr>
        <tr>
            <td>班级</td>
            <td>
                <select name="classId">
                    <option value="0">请选择</option>
                    <c:forEach items="${classes}" var="c">
                        <option
                            <c:if test="${student.classId==c.id}">
                                selected="selected"
                            </c:if>
                            value="${c.id}">${c.name}</option>
                    </c:forEach>
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="提交">
            </td>
        </tr>
    </table>
</form>
</body>
</html>
